<link rel="stylesheet" href="../core/resource/weui/weui.css?v=19">
<style type="text/css">
body{background:#eee}
.storelogo img{width:3.2rem;height:3.2rem}
.merchgroup .store-star {padding:0.1rem 0 0.2rem 0;font-size:0.55rem;line-height:1rem}
.merchgroup .store-star img{height:0.66rem}
.star-on,.star-off{position:absolute;top:1rem;left:0;overflow:hidden}
.star-rate {margin-left:3.6rem}
.store-distance{float:right;color:#999}
.store-moneylimit{font-size:0.55rem}
</style>
<div class="fui-page order-create-page fui-page-current" ng-if="pagedata.op == 'main'">
	 <div class="fui-header">
		<div class="fui-header-left" ng-click="goback()">
            <a class="back"></a>
        </div>
		<div class="title">确认订单</div>
		<div class="fui-header-right"></div>
	</div>
	<div class="fui-content">
		<div class="weui_cell">
                <div class="weui_cell_bd weui_cell_primary">
                    <span>服务项目</span>
                </div>
                <div class="weui_cell_ft" ng-model="pagedata.post.serve_title">{{pagedata.serve_title}}</div>
        </div>
		<div class="weui_cell">
                <div class="weui_cell_bd weui_cell_primary">
                    <span>服务套餐</span>
                </div>
                <div class="weui_cell_ft" ng-model="pagedata.post.package_title">{{pagedata.package.package_title}}</div>
        </div>
		<div class="weui_cell">
                <div class="weui_cell_bd weui_cell_primary">
                    <span>预约时间</span>
                </div>
                <div class="weui_cell_ft" ng-model="pagedata.post.time">{{pagedata.day}}--{{pagedata.serve_time.times.start}}--{{pagedata.serve_time.times.end}}</div>
        </div>
		<div class="weui_cell">
                <div class="weui_cell_bd weui_cell_primary">
                    <span>服务费用</span>
                </div>
                <div class="weui_cell_ft" ng-model="pagedata.post.package_price">{{pagedata.package.package_price}}</div>
        </div>
		<div class="weui_btn_area">
			 <a class="weui_btn weui_btn_primary" href="javascript:" id="showTooltips" ng-click="pagedata.pay()">确认支付</a>
		</div>
</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
scope.pagedata.pay=function(){
	var params={
		data:{'package_price':scope.pagedata.package.package_price},
		op:'notice',
		callback:function(res){
			if(res.payid){
				require(['tool'],function(tool){
					tool.pay(res.payid,function(res){
						if(res.type=='success'){
							scope.message('支付成功！','','jy_meiye/order/list/status=1');
							
						}else{
							scope.message('支付失败！失败原因：'+res.message,'error');
						}
					});
				});
			}
		}
	};
	scope.post_json(params);

}
</script>